From: Keir Fraser Date: Tue, 13 May 2008 08:20:23 +0000 (+0100) Subject: Further minor ssl relo fixes. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14215^2~23 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=a6cd3290d8b5a432446ad68a346b7b80eefc3db4;p=xen.git Further minor ssl relo fixes. Signed-off-by: Zhigang Wang --- diff --git a/tools/python/xen/web/connection.py b/tools/python/xen/web/connection.py index 5145f632b6..7d5702fce0 100644 --- a/tools/python/xen/web/connection.py +++ b/tools/python/xen/web/connection.py @@ -135,13 +135,15 @@ class SSLSocketServerConnection(SocketServerConnection): received data to one end of the pipe, then read from the other end: p2cread, p2cwrite = os.pipe() - threading.Thread(target=connection.recv2fd, args=(sock, p2cwrite)).start() + threading.Thread(target=connection.SSLSocketServerConnection.recv2fd, + args=(sock, p2cwrite)).start() os.read(p2cread, 1024) To use fd2send(): p2cread, p2cwrite = os.pipe() - threading.Thread(target=connection.fd2send, args=(sock, p2cread)).start() + threading.Thread(target=connection.SSLSocketServerConnection.fd2send, + args=(sock, p2cread)).start() os.write(p2cwrite, "data") """ @@ -233,6 +235,7 @@ class SSLSocketServerConnection(SocketServerConnection): recv2fd = staticmethod(recv2fd) + def fd2send(sock, fd): try: while True: @@ -278,6 +281,7 @@ class SSLSocketServerConnection(SocketServerConnection): fd2send = staticmethod(fd2send) + def hostAllowed(addrport, hosts_allowed): if hosts_allowed is None: return True